package xiancheng.demo01;

/**
 * @author Mr.ma
 * @since 2022/10/31 13:49
 **/
public class Test01 {
    public static void main(String[] args) {
        TestThread testThread = new TestThread();
        testThread.start();
        Thread.currentThread().setName("主线程");
        for (int i = 0; i < 200; i++) {
            System.out.println(Thread.currentThread().getName() + " ========== " + i);
        }
    }
}
class TestThread extends Thread{
    @Override
    public void run(){
        this.setName("testThread");
        for (int i = 0; i < 20; i++) {
            System.out.println(this.getName() + " ========= " + i);
        }
    }
}
